home *** CD-ROM | disk | FTP | other *** search
-
- //------------------------------------------------------------------->
- //
- // thing-5.inc
- //
- // "Easy POV Oven"
- //
- // Written By: Paul T. Dawson
- // ptdawson@voicenet.com
- // http://www.voicenet.com/~ptdawson
- //
- // All code and techniques are PUBLIC DOMAIN - have fun with it!
- //
- //------------------------------------------------------------------->
- //
- // Thing_5 is a group of miniature people. This eats a LOT of memory!
- //
- // This is a total jumble!!! It's derived from the standard P4 include
- // file, but with loops and random numbers added. Whew!?!
- //
- //------------------------------------------------------------------->
- //
- // Use a special seed, so things turn out the same in final scene.
-
- #declare T5R = seed(444)
-
- //------------------------------------------------------------------->
- //
- // Start the big loop to make all of the people.
-
- #declare THING_5_LOOP = 1 #while ( THING_5_LOOP <= 9 )
-
- //------------------------------------------------------------------->
- //
- // Declare the *textures* for everything.
-
- #declare P4_Eye_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Glasses_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Hair_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Hat_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Shirt_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Shoe_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Shorts_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
- #declare P4_Skin_Texture =texture{pigment{color rgb<rand(T5R),rand(T5R),rand(T5R)>}}
-
- //------------------------------------------------------------------->
- //
- // Now choose *types* of things. You will have to read the directions
- // to see what numbers are legal here!
-
- #declare P4_Eye_Type = 1
- #declare P4_Glasses_Type = int(rand(T5R)*2)
- #declare P4_Hair_Type = int(rand(T5R)*3)+1
- #declare P4_Hand_Type = 1
-
- #declare P4_Hat_Type = int(rand(T5R)*5)+1
- #if (P4_Hair_Type=2) #declare P4_Hat_Type=0 #end
-
- #declare P4_Mouth_Type = int(rand(T5R)*5)+1
- #declare P4_Nose_Type = 1
- #declare P4_Shirt_Type = 2
- #declare P4_Shoe_Type = 3
- #declare P4_Shorts_Type = int(rand(T5R)*3)+1
-
- //------------------------------------------------------------------->
- //
- // Set the sizes of various things (all the same).
-
- #declare P4_Leg_Length = 34
- #declare P4_Neck_Height = 3
- #declare P4_Shirt_Height = 22
- #declare P4_Shorts_Height = 12
-
- //------------------------------------------------------------------->
- //
- // Choose the rotation values. Only arms are random!
-
- #declare P4_Hat_Rotate = < 10, 60, 0 >
- #declare P4_Neck_Rotate = < -10, 30, 0 >
- #declare P4_Waist_Rotate = < -10, 20, 0 >
-
- #declare P4_Left_Hand_Rotate = < -40, 0, -40 >
- #declare P4_Right_Hand_Rotate = < 10, 0, 40 >
-
- #declare P4_Left_Elbow_Rotate = < 00, (rand(T5R)*80)-40, 0 >
- #declare P4_Right_Elbow_Rotate = < 00, (rand(T5R)*80)-40, 0 >
-
- #declare P4_Left_Eyelid_Rotate = -40
- #declare P4_Right_Eyelid_Rotate = -40
-
- #declare P4_Left_Knee_Rotate = < -10, 0, 0 >
- #declare P4_Right_Knee_Rotate = < -10, 0, 0 >
-
- #declare P4_Left_Leg_Rotate = < 10, 0, -10 >
- #declare P4_Right_Leg_Rotate = < 10, 0, 10 >
-
- #declare P4_Left_Shoulder_Rotate = < (rand(T5R)*80)-40, (rand(T5R)*80)-40, (rand(T5R)*80)-40 >
- #declare P4_Right_Shoulder_Rotate = < (rand(T5R)*80)-40, (rand(T5R)*80)-40, (rand(T5R)*80)-40 >
-
- //------------------------------------------------------------------->
- //
- // Miscellaneous.
-
- #declare P4_Holding_Flag = false
- #declare P4_Bracelet_Flag = false
- #declare P4_Total_Scale = 4/100
- #declare P4_Y_Adjust = 1.6
-
- //------------------------------------------------------------------->
- //
- // Now call "p4_main.inc" to create the object.
-
- #include "p4_main.inc"
-
- //------------------------------------------------------------------->
- //
- // End the big loop.
-
- #if (THING_5_LOOP=1) #declare TEMP_01=object{One_Person} #end
- #if (THING_5_LOOP=2) #declare TEMP_02=object{One_Person} #end
- #if (THING_5_LOOP=3) #declare TEMP_03=object{One_Person} #end
- #if (THING_5_LOOP=4) #declare TEMP_04=object{One_Person} #end
- #if (THING_5_LOOP=5) #declare TEMP_05=object{One_Person} #end
- #if (THING_5_LOOP=6) #declare TEMP_06=object{One_Person} #end
- #if (THING_5_LOOP=7) #declare TEMP_07=object{One_Person} #end
- #if (THING_5_LOOP=8) #declare TEMP_08=object{One_Person} #end
- #if (THING_5_LOOP=9) #declare TEMP_09=object{One_Person} #end
-
- #declare THING_5_LOOP = THING_5_LOOP + 1 #end
-
- //------------------------------------------------------------------->
- //
- // Now put everything together.
-
- #declare Thing_5 = union {
-
- object { TEMP_01 rotate y*(rand(T5R)*360) translate < -2.5, 0, -2.5 > }
- object { TEMP_02 rotate y*(rand(T5R)*360) translate < 0, 0, -2.5 > }
- object { TEMP_03 rotate y*(rand(T5R)*360) translate < 2.5, 0, -2.5 > }
- object { TEMP_04 rotate y*(rand(T5R)*360) translate < -2.5, 0, 0 > }
- object { TEMP_05 rotate y*(rand(T5R)*360) translate < 0, 0, 0 > }
- object { TEMP_06 rotate y*(rand(T5R)*360) translate < 2.5, 0, 0 > }
- object { TEMP_07 rotate y*(rand(T5R)*360) translate < -2.5, 0, 2 > }
- object { TEMP_08 rotate y*(rand(T5R)*360) translate < 0, 0, 2.5 > }
- object { TEMP_09 rotate y*(rand(T5R)*360) translate < 2.5, 0, 2.5 > }
-
- // Bases for them to stand on.
- cylinder {<-2.5,0,-2.5> <-2.5,0.11,-2.5>,0.9 pigment { Red } }
- cylinder {< 0,0,-2.5> < 0,0.11,-2.5>,0.9 pigment { Red } }
- cylinder {< 2.5,0,-2.5> < 2.5,0.11,-2.5>,0.9 pigment { Red } }
- cylinder {<-2.5,0, 0> <-2.5,0.11, 0>,0.9 pigment { Red } }
- cylinder {< 0,0, 0> < 0,0.11, 0>,0.9 pigment { Red } }
- cylinder {< 2.5,0, 0> < 2.5,0.11, 0>,0.9 pigment { Red } }
- cylinder {<-2.5,0, 2.5> <-2.5,0.11, 2.5>,0.9 pigment { Red } }
- cylinder {< 0,0, 2.5> < 0,0.11, 2.5>,0.9 pigment { Red } }
- cylinder {< 2.5,0, 2.5> < 2.5,0.11, 2.5>,0.9 pigment { Red } }
-
- } // End of union.
-
- //------------------------------------------------------------------->
- //
- // End of this file.
-
-